package com.loeng.framework.operatelog.config;

import com.loeng.framework.operatelog.core.aop.OperateLogAspect;
import com.loeng.framework.operatelog.core.service.OperateLogFrameworkService;
import com.loeng.framework.operatelog.core.service.OperateLogFrameworkServiceImpl;
import com.loeng.module.system.api.logger.OperateLogApi;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * 操作日志自动配置
 * @author loeng
 * @date 2025/5/18 14:17
 */
@AutoConfiguration
public class LoengOperateLogAutoConfiguration {

    /**
     * 操作日志切面
     */
    @Bean
    public OperateLogAspect operateAspect(){
        return new OperateLogAspect();
    }

    /**
     * 操作日志服务
     */
    @Bean
    public OperateLogFrameworkService operateLogFrameworkService(OperateLogApi operateLogApi){
        return new OperateLogFrameworkServiceImpl(operateLogApi);
    }

}
